<template>
	<view>
		<parser :html="desc" class="pice" style="width: '100%';" ></parser>
	</view>
</template>

<script>
	import parser from "@/components/jyf-Parser/index"
	export default {
		components: {
		   parser
		 },
		data() {
			return {
				desc:'',
				url:this.$host,
				videourl:'',
				show:''
			}
		},
		onLoad(option) {
			var id=option.id
			this.id=option.id
			console.log(this.id)
			uni.request({
					url: 'http://tuiguang.yiyunoto.com/api/index/articlecontent',
					method:'POST',
					data:{articlesid:this.id},
					headers:{authtoken:this.$store.state.token},
					success: (res) => {
					console.log("分类",res);
					this.desc=res.data.data.content
					// 截取视频开始
					// this.desc= this.desc.replace("px","upx")
					this.desc= this.desc.replace(/\<video /gi,'<video style="width:100%;" ')
					this.desc= this.desc.replace(/\ src="/g,' src="'+this.url)
					},
					fail:(res)=>{
						console.log("请求失败",res)
					}
				});
		},
		methods: {
			
		}
	}
</script>

<style>
.pice{
		width: 100%;
		padding: 50upx;
		box-sizing: border-box;
	}
</style>
